{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 第五章 曲率和方程近似解\n",
    "\n",
    "## 1. 曲率的定义\n",
    "\n",
    "曲率是描述曲线弯曲程度的量。对于平面曲线 \\( y = f(x) \\)，其在某一点的曲率 \\( \\kappa \\) 定义为：\n",
    "\n",
    "$$\n",
    "\\kappa = \\frac{|f''(x)|}{(1 + (f'(x))^2)^{3/2}}\n",
    "$$\n",
    "\n",
    "其中：\n",
    "- \\( f'(x) \\) 为曲线的导数，表示切线的斜率，\n",
    "- \\( f''(x) \\) 为曲线的二阶导数，表示曲线的弯曲程度。\n",
    "\n",
    "曲率的物理意义是：曲率越大，曲线在该点的弯曲程度越高。\n",
    "\n",
    "### 1.1. 曲率的几何意义\n",
    "\n",
    "曲率的几何意义是曲线在某一点的“弯曲半径”。若曲率较大，表示该点的弯曲半径较小，曲线在该点弯曲得更厉害。反之，曲率较小，表示弯曲半径较大，曲线弯曲程度较小。\n",
    "\n",
    "---\n",
    "\n",
    "## 2. 曲线的方程近似解\n",
    "\n",
    "在数学和物理中，很多时候我们需要通过近似的方法来求解复杂的方程。常见的近似方法有：\n",
    "- 泰勒级数近似\n",
    "- 牛顿法\n",
    "- 欧拉法等\n",
    "\n",
    "### 2.1. 泰勒级数近似\n",
    "\n",
    "泰勒级数可以用来表示函数 \\( f(x) \\) 在某一点 \\( x_0 \\) 附近的近似。泰勒级数展开式为：\n",
    "\n",
    "$$\n",
    "f(x) = f(x_0) + f'(x_0)(x - x_0) + \\frac{f''(x_0)}{2!}(x - x_0)^2 + \\cdots\n",
    "$$\n",
    "\n",
    "通过截断泰勒级数的高阶项，我们可以得到函数的近似解。\n",
    "\n",
    "#### 例子：使用泰勒级数近似求解 \\( e^x \\)\n",
    "\n",
    "我们以 \\( e^x \\) 为例，来应用泰勒级数展开式。假设我们要在 \\( x_0 = 0 \\) 处展开：\n",
    "\n",
    "$$\n",
    "e^x = e^0 + e'(0)x + \\frac{e''(0)}{2!}x^2 + \\cdots\n",
    "$$\n",
    "\n",
    "由于 \\( e^x \\) 的导数一直是 \\( e^x \\)，因此 \\( e^0 = 1 \\)，\\( e'(0) = 1 \\)，\\( e''(0) = 1 \\)，得到：\n",
    "\n",
    "$$\n",
    "e^x \\approx 1 + x + \\frac{x^2}{2!} + \\frac{x^3}{3!} + \\cdots\n",
    "$$\n",
    "\n",
    "例如，当 \\( x = 0.1 \\) 时，可以近似为：\n",
    "\n",
    "$$\n",
    "e^{0.1} \\approx 1 + 0.1 + \\frac{0.1^2}{2!} = 1 + 0.1 + 0.005 = 1.105\n",
    "$$\n",
    "\n",
    "---\n",
    "\n",
    "## 3. 方程的近似解法\n",
    "\n",
    "对于一些复杂的方程，可能无法得到解析解。这时，我们可以使用数值方法求解近似解。常用的数值方法包括：\n",
    "\n",
    "- **牛顿法**：用于求解方程 \\( f(x) = 0 \\) 的根，迭代公式为：\n",
    "  $$\n",
    "  x_{n+1} = x_n - \\frac{f(x_n)}{f'(x_n)}\n",
    "  $$\n",
    "\n",
    "- **欧拉法**：用于求解常微分方程，迭代公式为：\n",
    "  $$\n",
    "  y_{n+1} = y_n + h f(x_n, y_n)\n",
    "  $$\n",
    "\n",
    "其中，\\( h \\) 是步长。\n",
    "\n",
    "---\n",
    "\n",
    "## 4. 例题：使用牛顿法求解方程\n",
    "\n",
    "考虑方程 \\( f(x) = x^3 - 5x + 3 = 0 \\)，我们可以使用牛顿法来求解它的近似解。\n",
    "\n",
    "### 步骤：\n",
    "1. 设定初始猜测值 \\( x_0 = 1 \\)。\n",
    "2. 计算 \\( f(x) = x^3 - 5x + 3 \\) 和 \\( f'(x) = 3x^2 - 5 \\)。\n",
    "3. 使用牛顿法公式进行迭代：\n",
    "   $$\n",
    "   x_{n+1} = x_n - \\frac{f(x_n)}{f'(x_n)}\n",
    "   $$\n",
    "\n",
    "#### 解法：\n",
    "\n",
    "1. 初始值 \\( x_0 = 1 \\)：\n",
    "   $$\n",
    "   f(1) = 1^3 - 5 \\cdot 1 + 3 = -1\n",
    "   $$\n",
    "   $$\n",
    "   f'(1) = 3 \\cdot 1^2 - 5 = -2\n",
    "   $$\n",
    "\n",
    "   计算下一个近似解：\n",
    "   $$\n",
    "   x_1 = 1 - \\frac{-1}{-2} = 1 + 0.5 = 1.5\n",
    "   $$\n",
    "\n",
    "2. 继续迭代，得到更精确的解。\n",
    "\n",
    "通过多次迭代，我们可以得到方程的根的近似解。\n",
    "\n",
    "---\n",
    "\n",
    "## 5. 总结\n",
    "\n",
    "在本节中，我们学习了曲率的定义和几何意义，了解了如何使用泰勒级数和数值方法（如牛顿法和欧拉法）求解方程的近似解。这些方法在许多实际问题中都非常有用，尤其是在无法得到解析解的情况下。\n",
    "\n",
    "通过对这些方法的理解和应用，可以帮助我们更好地解决复杂的数学和物理问题。\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python",
   "version": "3.12.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
